<template>
  <view class="viewer">
    <web-view :src="fileUrl"></web-view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      suffix: 'pdf',
      fileUrl: '/static/pdf/web/viewer.html?file='
    };
  },
  onShow() {
    const previewUrl = uni.getStorageSync('previewUrl');
  
    this.fileUrl +=  previewUrl
  },
  methods: {

  },
  onUnload() {
    uni.removeStorageSync('previewUrl');
  }
};
</script>

<style scoped>
.viewer {
 /* width: 100%;
  height: 100%;
  padding: 10px;
  background: gray; */
}

</style>
